//#扩展数学库·静态库#//
/****extcmath.c is used as an extension to the standard library math.h~!****/
//extcmath.c
#include "extcmath.h"
/****特殊属性函数定义开始****/
void when_call_func(void (*head_func)(),void (*tail_func)())
{
	head_func();
	tail_func();
}
void when_calls_func(size_t call_times,void (*head_func)(),void (*tail_func)())
{
	static size_t call_times_count=0;
	size_t call_wait_times;
	call_wait_times=0;
	head_func();
	call_times_count+=1;
	if (call_times_count>=call_times)
	{
		tail_func();
		call_times_count=0;
	}
	else
	{
		call_wait_times=call_times-call_times_count;
		switch (call_wait_times)
		{
			case 1:print("function::head_func must be called once before function::tail_func can be executed.\n");break;
			case 2:print("function::head_func must be called twice before function::tail_func can be executed.\n");break;
			case 3 ... SIZE_MAX:print("function::head_func must be called %zu times before function::tail_func can be executed.\n",call_wait_times);break;
			default:;break;
		}
	}
}
void when_year_func(int target_year,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (1900+tp->tm_year==target_year)
        {
            func();
            break;
        }
    }
}
void when_range_year_func(int head_year,int tail_year,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((1900+tp->tm_year>=head_year)&&(1900+tp->tm_year<=tail_year))
        {
            func();
            break;
        }
    }
}
void when_month_func(int target_month,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (1+tp->tm_mon==target_month)
        {
            func();
            break;
        }
    }
}
void when_range_month_func(int head_month,int tail_month,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((1+tp->tm_mon>=head_month)&&(1+tp->tm_mon<=tail_month))
        {
            func();
            break;
        }
    }
}
void when_day_func(int target_day,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (tp->tm_mday==target_day)
        {
            func();
            break;
        }
    }
}
void when_range_day_func(int head_day,int tail_day,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((tp->tm_mday>=head_day)&&(tp->tm_mday<=tail_day))
        {
            func();
            break;
        }
    }
}
void when_week_func(int target_week,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (tp->tm_wday==target_week)
        {
            func();
            break;
        }
    }
}
void when_range_week_func(int head_week,int tail_week,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((tp->tm_wday>=head_week)&&(tp->tm_wday<=tail_week))
        {
            func();
            break;
        }
    }
}
void when_hour_func(int target_hour,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (tp->tm_hour==target_hour)
        {
            func();
            break;
        }
    }
}
void when_range_hour_func(int head_hour,int tail_hour,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((tp->tm_hour>=head_hour)&&(tp->tm_hour<=tail_hour))
        {
            func();
            break;
        }
    }
}
void when_minute_func(int target_minute,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (tp->tm_min==target_minute)
        {
            func();
            break;
        }
    }
}
void when_range_minute_func(int head_minute,int tail_minute,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((tp->tm_min>=head_minute)&&(tp->tm_min<=tail_minute))
        {
            func();
            break;
        }
    }
}
void when_second_func(int target_second,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if (tp->tm_sec==target_second)
        {
            func();
            break;
        }
    }
}
void when_range_second_func(int head_second,int tail_second,void (*func)())
{
    time_t now_time;
    struct tm *tp;
    while (TRUTH)
    {
        time(&now_time);
        tp=localtime(&now_time);
        if ((tp->tm_sec>=head_second)&&(tp->tm_sec<=tail_second))
        {
            func();
            break;
        }
    }
}
int print(const char *restrict format,...)
{
	va_list ap;
	int ret;
	va_start(ap,format);
	ret=vprintf(format,ap);
	va_end(ap);
	return ret;
}
int scan(const char *restrict format,...)
{
	va_list ap;
	int ret;
	va_start(ap,format);
	ret=vscanf(format,ap);
	va_end(ap);
	return ret;
}
int wprint(const wchar_t *restrict format,...)
{
	va_list ap;
	int ret;
	va_start(ap,format);
	ret=vwprintf(format,ap);
	va_end(ap);
	return ret;
}
int wscan(const wchar_t *restrict format,...)
{
	va_list ap;
	int ret;
	va_start(ap,format);
	ret=vwscanf(format,ap);
	va_end(ap);
	return ret;
}
//
int get_stdc_age()
{
    int stdc_age;
    time_t now_time;
    struct tm *tp;
    time(&now_time);
    tp=localtime(&now_time);
    stdc_age=(1900+tp->tm_year)-1972;
    return stdc_age;
}
void get_stdc_version()
{
    int stdc_version;
    time_t now_time;
    struct tm *tp;
    time(&now_time);
    tp=localtime(&now_time);
    stdc_version=(1900+tp->tm_year)-1978;
    print("Compiler remains K&R::C::std\n~%dy ago\n",stdc_version);
    stdc_version=(1900+tp->tm_year)-1989;
    print("Compiler support C89::ANSI/X3.159./1989::std\n~%dy ago\n",stdc_version);
    stdc_version=(1900+tp->tm_year)-1990;
    print("Compiler support C90::ISO/IEC·9899:1990::std\n~%dy ago\n",stdc_version);
    if (__STDC_VERSION__>=199409L)
    {
        stdc_version=(1900+tp->tm_year)-1994;
        print("Compiler support C94::ISO/IEC·9899:1994::std\n~%dy ago\n",stdc_version);
    }
    if (__STDC_VERSION__>=199506L)
    {
        stdc_version=(1900+tp->tm_year)-1995;
        print("Compiler support C95::ISO/IEC·9899:1995::std\n~%dy ago\n",stdc_version);
    }
    if (__STDC_VERSION__>=199901L)
    {
        stdc_version=(1900+tp->tm_year)-1999;
        print("Compiler support C99::ISO/IEC·9899:1999::std\n~%dy ago\n",stdc_version);
    }
    if (__STDC_VERSION__>=201112L)
    {
        stdc_version=(1900+tp->tm_year)-2011;
        print("Compiler support C11::ISO/IEC·9899:2011::std\n~%dy ago\n",stdc_version);
    }
    if (__STDC_VERSION__>=201710L)
    {
        stdc_version=(1900+tp->tm_year)-2017;
        print("Compiler support C17::ISO/IEC·9899:2017::std\n~%dy ago\n",stdc_version);
    }
    if (__STDC_VERSION__>=202000L)
    {
        stdc_version=(1900+tp->tm_year)-2023;
        print("Compiler support C2X::ISO/IEC·9899:2023::std\n~%dy ago\n",stdc_version);
    }
    if (__STDC_VERSION__>=202311L)
    {
    	stdc_version=(1900+tp->tm_year)-2023;
        print("Compiler support C23::ISO/IEC·9899:2024::std\n~%dy ago\n",stdc_version);
    }
}
//
void extcmath_get_stdc_age()
{
    int stdc_age;
    stdc_age=get_stdc_age();
    print("STDC age -> %dy\n",stdc_age);
}
void extcmath_get_stdc_version()
{
    get_stdc_version();
}
void extcmath_init()
{
    print("@extcmath.init\n");
    extcmath_get_stdc_age();
    extcmath_get_stdc_version();
}
void extcmath_exit()
{
    print("@extcmath.exit\n");
}
/****特殊属性函数定义结束****/
/****数学计算函数定义开始****/
bool is_odd_num(int num)
{
	return ((num&1)==1)?true:false;
}
bool is_odd_numl(long int num)
{
	return ((num&1)==1)?true:false;
}
bool is_odd_numll(long long int num)
{
	return ((num&1)==1)?true:false;
}
bool is_even_num(int num)
{
	return ((num&1)==0)?true:false;
}
bool is_even_numl(long int num)
{
	return ((num&1)==0)?true:false;
}
bool is_even_numll(long long int num)
{
	return ((num&1)==0)?true:false;
}
bool is_prime_num(int_size_t num)
{
	int_size_t loop;
	if ((num==0)||(num==1))
	{
		return false;
	}
	if ((num==2)||(num==3))
	{
		return true;
	}
	if ((num%2==0)||(num%3==0))
	{
		return false;
	}
	for (loop=5;loop*loop<=num;loop+=6)
	{
		if ((num%loop==0)||((num%(loop+2))==0))
		{
			return false;
		}
	}
	return true;
}
bool is_prime_numl(long_size_t num)
{
	long_size_t loop;
	if ((num==0)||(num==1))
	{
		return false;
	}
	if ((num==2)||(num==3))
	{
		return true;
	}
	if ((num%2==0)||(num%3==0))
	{
		return false;
	}
	for (loop=5;loop*loop<=num;loop+=6)
	{
		if ((num%loop==0)||((num%(loop+2))==0))
		{
			return false;
		}
	}
	return true;
}
bool is_prime_numll(huge_size_t num)
{
	huge_size_t loop;
	if ((num==0)||(num==1))
	{
		return false;
	}
	if ((num==2)||(num==3))
	{
		return true;
	}
	if ((num%2==0)||(num%3==0))
	{
		return false;
	}
	for (loop=5;loop*loop<=num;loop+=6)
	{
		if ((num%loop==0)||((num%(loop+2))==0))
		{
			return false;
		}
	}
	return true;
}
bool is_composite_num(int_size_t num)
{
	int_size_t loop;
	if ((num==0)||(num==1))
	{
		return false;
	}
	if ((num==2)||(num==3))
	{
		return false;
	}
	if ((num%2==0)||(num%3==0))
	{
		return true;
	}
	for (loop=5;loop*loop<=num;loop+=6)
	{
		if ((num%loop==0)||((num%(loop+2))==0))
		{
			return true;
		}
	}
	return false;
}
bool is_composite_numl(long_size_t num)
{
	long_size_t loop;
	if ((num==0)||(num==1))
	{
		return false;
	}
	if ((num==2)||(num==3))
	{
		return false;
	}
	if ((num%2==0)||(num%3==0))
	{
		return true;
	}
	for (loop=5;loop*loop<=num;loop+=6)
	{
		if ((num%loop==0)||((num%(loop+2))==0))
		{
			return true;
		}
	}
	return false;
}
bool is_composite_numll(huge_size_t num)
{
	huge_size_t loop;
	if ((num==0)||(num==1))
	{
		return false;
	}
	if ((num==2)||(num==3))
	{
		return false;
	}
	if ((num%2==0)||(num%3==0))
	{
		return true;
	}
	for (loop=5;loop*loop<=num;loop+=6)
	{
		if ((num%loop==0)||((num%(loop+2))==0))
		{
			return true;
		}
	}
	return false;
}
int_size_t range_natural_num_sum(int_size_t head,int_size_t tail)
{
	int_size_t result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    result=(head+tail)*(tail-head+1)/2;
    return result;
}
long_size_t range_natural_num_suml(long_size_t head,long_size_t tail)
{
	long_size_t result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    result=(head+tail)*(tail-head+1)/2;
    return result;
}
huge_size_t range_natural_num_sumll(huge_size_t head,huge_size_t tail)
{
	huge_size_t result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    result=(head+tail)*(tail-head+1)/2;
    return result;
}
int range_integer_sum(int head,int tail)
{
    int result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    result=(head+tail)*(tail-head+1)/2;
    return result;
}
long int range_integer_suml(long int head,long int tail)
{
    long int result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    result=(head+tail)*(tail-head+1)/2;
    return result;
}
long long int range_integer_sumll(long long int head,long long int tail)
{
    long long int result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    result=(head+tail)*(tail-head+1)/2;
    return result;
}
int range_odd_sum(int head,int tail)
{
    int loop,result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_odd_num(loop))
        {
            result+=loop;
        }
    }
    return result;
}
long int range_odd_suml(long int head,long int tail)
{
    long int loop,result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_odd_numl(loop))
        {
            result+=loop;
        }
    }
    return result;
}
long long int range_odd_sumll(long long int head,long long int tail)
{
    long long int loop,result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_odd_numll(loop))
        {
            result+=loop;
        }
    }
    return result;
}
int range_even_sum(int head,int tail)
{
    int loop,result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_even_num(loop))
        {
            result+=loop;
        }
    }
    return result;
}
long int range_even_suml(long int head,long int tail)
{
    long int loop,result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_even_numl(loop))
        {
            result+=loop;
        }
    }
    return result;
}
long long int range_even_sumll(long long int head,long long int tail)
{
    long long int loop,result;
    result=0;
    if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_even_numll(loop))
        {
            result+=loop;
        }
    }
    return result;
}
int_size_t range_prime_sum(int_size_t head,int_size_t tail)
{
	int_size_t loop,result;
	result=0;
	if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_prime_num(loop))
        {
            result+=loop;
        }
    }
    return result;
}
long_size_t range_prime_suml(long_size_t head,long_size_t tail)
{
	long_size_t loop,result;
	result=0;
	if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_prime_numl(loop))
        {
            result+=loop;
        }
    }
    return result;
}
huge_size_t range_prime_sumll(huge_size_t head,huge_size_t tail)
{
	huge_size_t loop,result;
	result=0;
	if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_prime_numll(loop))
        {
            result+=loop;
        }
    }
    return result;
}
int_size_t range_composite_sum(int_size_t head,int_size_t tail)
{
	int_size_t loop,result;
	result=0;
	if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_composite_num(loop))
        {
            result+=loop;
        }
    }
    return result;
}
long_size_t range_composite_suml(long_size_t head,long_size_t tail)
{
	long_size_t loop,result;
	result=0;
	if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_composite_numl(loop))
        {
            result+=loop;
        }
    }
    return result;
}
huge_size_t range_composite_sumll(huge_size_t head,huge_size_t tail)
{
	huge_size_t loop,result;
	result=0;
	if (head>=tail)
    {
        return FAILURE_SIGN;
    }
    for (loop=head;loop<=tail;loop++)
    {
        if (is_composite_numll(loop))
        {
            result+=loop;
        }
    }
    return result;
}
/****数学计算函数定义结束****/
/****实数域扩展三角函数定义开始****/
float cotf(float num)
{
    float result;
    result=1.0/(tanf((num)));
    return result;
}
double cot(double num)
{
    double result;
    result=1.0/(tan((num)));
    return result;
}
long double cotl(long double num)
{
    long double result;
    result=1.0/(tanl((num)));
    return result;
}
float secf(float num)
{
    float result;
    result=1.0/(cosf((num)));
    return result;
}
double sec(double num)
{
    double result;
    result=1.0/(cos((num)));
    return result;
}
long double secl(long double num)
{
    long double result;
    result=1.0/(cosl((num)));
    return result;
}
float cscf(float num)
{
    float result;
    result=1.0/(sinf((num)));
    return result;
}
double csc(double num)
{
    double result;
    result=1.0/(sin((num)));
    return result;
}
long double cscl(long double num)
{
    long double result;
    result=1.0/(sinl((num)));
    return result;
}
float acotf(float num)
{
    float result;
    result=1.0/(atanf((num)));
    return result;
}
double acot(double num)
{
    double result;
    result=1.0/(atan((num)));
    return result;
}
long double acotl(long double num)
{
    long double result;
    result=1.0/(atanl((num)));
    return result;
}
float asecf(float num)
{
    float result;
    result=1.0/(acosf((num)));
    return result;
}
double asec(double num)
{
    double result;
    result=1.0/(acos((num)));
    return result;
}
long double asecl(long double num)
{
    long double result;
    result=1.0/(acosl((num)));
    return result;
}
float acscf(float num)
{
    float result;
    result=1.0/(asinf((num)));
    return result;
}
double acsc(double num)
{
    double result;
    result=1.0/(asin((num)));
    return result;
}
long double acscl(long double num)
{
    long double result;
    result=1.0/(asinl((num)));
    return result;
}
float versinf(float num)
{
    float result;
    result=1.0-(cosf((num)));
    return result;
}
double versin(double num)
{
    double result;
    result=1.0-(cos((num)));
    return result;
}
long double versinl(long double num)
{
    long double result;
    result=1.0-(cosl((num)));
    return result;
}
float vercosf(float num)
{
    float result;
    result=1.0-(sinf((num)));
    return result;
}
double vercos(double num)
{
    double result;
    result=1.0-(sin((num)));
    return result;
}
long double vercosl(long double num)
{
    long double result;
    result=1.0-(sinl((num)));
    return result;
}
float haversinf(float num)
{
    float result;
    result=(1.0-(cosf((num))))*0.5;
    return result;
}
double haversin(double num)
{
    double result;
    result=(1.0-(cos((num))))*0.5;
    return result;
}
long double haversinl(long double num)
{
    long double result;
    result=(1.0-(cosl((num))))*0.5;
    return result;
}
float havercosf(float num)
{
    float result;
    result=(1.0-(sinf((num))))*0.5;
    return result;
}
double havercos(double num)
{
    double result;
    result=(1.0-(sin((num))))*0.5;
    return result;
}
long double havercosl(long double num)
{
    long double result;
    result=(1.0-(sinl((num))))*0.5;
    return result;
}
float exsecf(float num)
{
    float result;
    result=(1.0/(cosf((num))))-1.0;
    return result;
}
double exsec(double num)
{
    double result;
    result=(1.0/(cos((num))))-1.0;
    return result;
}
long double exsecl(long double num)
{
    long double result;
    result=(1.0/(cosl((num))))-1.0;
    return result;
}
float excscf(float num)
{
    float result;
    result=(1.0/(sinf((num))))-1.0;
    return result;
}
double excsc(double num)
{
    double result;
    result=(1.0/(sin((num))))-1.0;
    return result;
}
long double excscl(long double num)
{
    long double result;
    result=(1.0/(sinl((num))))-1.0;
    return result;
}
float aversinf(float num)
{
    float result;
    result=1.0+(cosf((num)));
    return result;
}
double aversin(double num)
{
    double result;
    result=1.0+(cos((num)));
    return result;
}
long double aversinl(long double num)
{
    long double result;
    result=1.0+(cosl((num)));
    return result;
}
float avercosf(float num)
{
    float result;
    result=1.0+(sinf((num)));
    return result;
}
double avercos(double num)
{
    double result;
    result=1.0+(sin((num)));
    return result;
}
long double avercosl(long double num)
{
    long double result;
    result=1.0+(sinl((num)));
    return result;
}
float ahaversinf(float num)
{
    float result;
    result=(1.0+(cosf((num))))*0.5;
    return result;
}
double ahaversin(double num)
{
    double result;
    result=(1.0+(cos((num))))*0.5;
    return result;
}
long double ahaversinl(long double num)
{
    long double result;
    result=(1.0+(cosl((num))))*0.5;
    return result;
}
float ahavercosf(float num)
{
    float result;
    result=(1.0+(sinf((num))))*0.5;
    return result;
}
double ahavercos(double num)
{
    double result;
    result=(1.0+(sin((num))))*0.5;
    return result;
}
long double ahavercosl(long double num)
{
    long double result;
    result=(1.0+(sinl((num))))*0.5;
    return result;
}
float aexsecf(float num)
{
    float result;
    result=(1.0/(cosf((num))))+1.0;
    return result;
}
double aexsec(double num)
{
    double result;
    result=(1.0/(cos((num))))+1.0;
    return result;
}
long double aexsecl(long double num)
{
    long double result;
    result=(1.0/(cosl((num))))+1.0;
    return result;
}
float aexcscf(float num)
{
    float result;
    result=(1.0/(sinf((num))))+1.0;
    return result;
}
double aexcsc(double num)
{
    double result;
    result=(1.0/(sin((num))))+1.0;
    return result;
}
long double aexcscl(long double num)
{
    long double result;
    result=(1.0/(sinl((num))))+1.0;
    return result;
}
float cothf(float num)
{
    float result;
    result=1.0/(tanhf((num)));
    return result;
}
double coth(double num)
{
    double result;
    result=1.0/(tanh((num)));
    return result;
}
long double cothl(long double num)
{
    long double result;
    result=1.0/(tanhl((num)));
    return result;
}
float sechf(float num)
{
    float result;
    result=1.0/(coshf((num)));
    return result;
}
double sech(double num)
{
    double result;
    result=1.0/(cosh((num)));
    return result;
}
long double sechl(long double num)
{
    long double result;
    result=1.0/(coshl((num)));
    return result;
}
float cschf(float num)
{
    float result;
    result=1.0/(sinhf((num)));
    return result;
}
double csch(double num)
{
    double result;
    result=1.0/(sinh((num)));
    return result;
}
long double cschl(long double num)
{
    long double result;
    result=1.0/(sinhl((num)));
    return result;
}
float acothf(float num)
{
    float result;
    result=1.0/(atanhf((num)));
    return result;
}
double acoth(double num)
{
    double result;
    result=1.0/(atanh((num)));
    return result;
}
long double acothl(long double num)
{
    long double result;
    result=1.0/(atanhl((num)));
    return result;
}
float asechf(float num)
{
    float result;
    result=1.0/(acoshf((num)));
    return result;
}
double asech(double num)
{
    double result;
    result=1.0/(acosh((num)));
    return result;
}
long double asechl(long double num)
{
    long double result;
    result=1.0/(acoshl((num)));
    return result;
}
float acschf(float num)
{
    float result;
    result=1.0/(asinhf((num)));
    return result;
}
double acsch(double num)
{
    double result;
    result=1.0/(asinh((num)));
    return result;
}
long double acschl(long double num)
{
    long double result;
    result=1.0/(asinhl((num)));
    return result;
}
/****实数域扩展三角函数定义结束****/
/****复数域扩展三角函数定义开始****/
cp_float ccotf(cp_float num)
{
    cp_float result;
    result=1.0/(ctanf((num)));
    return result;
}
cp_double ccot(cp_double num)
{
    cp_double result;
    result=1.0/(ctan((num)));
    return result;
}
cp_doubles ccotl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(ctanl((num)));
    return result;
}
cp_float csecf(cp_float num)
{
    cp_float result;
    result=1.0/(ccosf((num)));
    return result;
}
cp_double csec(cp_double num)
{
    cp_double result;
    result=1.0/(ccos((num)));
    return result;
}
cp_doubles csecl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(ccosl((num)));
    return result;
}
cp_float ccscf(cp_float num)
{
    cp_float result;
    result=1.0/(csinf((num)));
    return result;
}
cp_double ccsc(cp_double num)
{
    cp_double result;
    result=1.0/(csin((num)));
    return result;
}
cp_doubles ccscl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(csinl((num)));
    return result;
}
cp_float cacotf(cp_float num)
{
    cp_float result;
    result=1.0/(catanf((num)));
    return result;
}
cp_double cacot(cp_double num)
{
    cp_double result;
    result=1.0/(catan((num)));
    return result;
}
cp_doubles cacotl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(catanl((num)));
    return result;
}
cp_float casecf(cp_float num)
{
    cp_float result;
    result=1.0/(cacosf((num)));
    return result;
}
cp_double casec(cp_double num)
{
    cp_double result;
    result=1.0/(cacos((num)));
    return result;
}
cp_doubles casecl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(cacosl((num)));
    return result;
}
cp_float cacscf(cp_float num)
{
    cp_float result;
    result=1.0/(casinf((num)));
    return result;
}
cp_double cacsc(cp_double num)
{
    cp_double result;
    result=1.0/(casin((num)));
    return result;
}
cp_doubles cacscl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(casinl((num)));
    return result;
}
cp_float cversinf(cp_float num)
{
    cp_float result;
    result=1.0-(ccosf((num)));
    return result;
}
cp_double cversin(cp_double num)
{
    cp_double result;
    result=1.0-(ccos((num)));
    return result;
}
cp_doubles cversinl(cp_doubles num)
{
    cp_doubles result;
    result=1.0-(ccosl((num)));
    return result;
}
cp_float cvercosf(cp_float num)
{
    cp_float result;
    result=1.0-(csinf((num)));
    return result;
}
cp_double cvercos(cp_double num)
{
    cp_double result;
    result=1.0-(csin((num)));
    return result;
}
cp_doubles cvercosl(cp_doubles num)
{
    cp_doubles result;
    result=1.0-(csinl((num)));
    return result;
}
cp_float chaversinf(cp_float num)
{
    cp_float result;
    result=(1.0-(ccosf((num))))*0.5;
    return result;
}
cp_double chaversin(cp_double num)
{
    cp_double result;
    result=(1.0-(ccos((num))))*0.5;
    return result;
}
cp_doubles chaversinl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0-(ccosl((num))))*0.5;
    return result;
}
cp_float chavercosf(cp_float num)
{
    cp_float result;
    result=(1.0-(csinf((num))))*0.5;
    return result;
}
cp_double chavercos(cp_double num)
{
    cp_double result;
    result=(1.0-(csin((num))))*0.5;
    return result;
}
cp_doubles chavercosl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0-(csinl((num))))*0.5;
    return result;
}
cp_float cexsecf(cp_float num)
{
    cp_float result;
    result=(1.0/(ccosf((num))))-1.0;
    return result;
}
cp_double cexsec(cp_double num)
{
    cp_double result;
    result=(1.0/(ccos((num))))-1.0;
    return result;
}
cp_doubles cexsecl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0/(ccosl((num))))-1.0;
    return result;
}
cp_float cexcscf(cp_float num)
{
    cp_float result;
    result=(1.0/(csinf((num))))-1.0;
    return result;
}
cp_double cexcsc(cp_double num)
{
    cp_double result;
    result=(1.0/(csin((num))))-1.0;
    return result;
}
cp_doubles cexcscl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0/(csinl((num))))-1.0;
    return result;
}
cp_float caversinf(cp_float num)
{
    cp_float result;
    result=1.0+(ccosf((num)));
    return result;
}
cp_double caversin(cp_double num)
{
    cp_double result;
    result=1.0+(ccos((num)));
    return result;
}
cp_doubles caversinl(cp_doubles num)
{
    cp_doubles result;
    result=1.0+(ccosl((num)));
    return result;
}
cp_float cavercosf(cp_float num)
{
    cp_float result;
    result=1.0+(csinf((num)));
    return result;
}
cp_double cavercos(cp_double num)
{
    cp_double result;
    result=1.0+(csin((num)));
    return result;
}
cp_doubles cavercosl(cp_doubles num)
{
    cp_doubles result;
    result=1.0+(csinl((num)));
    return result;
}
cp_float cahaversinf(cp_float num)
{
    cp_float result;
    result=(1.0+(ccosf((num))))*0.5;
    return result;
}
cp_double cahaversin(cp_double num)
{
    cp_double result;
    result=(1.0+(ccos((num))))*0.5;
    return result;
}
cp_doubles cahaversinl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0+(ccosl((num))))*0.5;
    return result;
}
cp_float cahavercosf(cp_float num)
{
    cp_float result;
    result=(1.0+(csinf((num))))*0.5;
    return result;
}
cp_double cahavercos(cp_double num)
{
    cp_double result;
    result=(1.0+(csin((num))))*0.5;
    return result;
}
cp_doubles cahavercosl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0+(csinl((num))))*0.5;
    return result;
}
cp_float caexsecf(cp_float num)
{
    cp_float result;
    result=(1.0/(ccosf((num))))+1.0;
    return result;
}
cp_double caexsec(cp_double num)
{
    cp_double result;
    result=(1.0/(ccos((num))))+1.0;
    return result;
}
cp_doubles caexsecl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0/(ccosl((num))))+1.0;
    return result;
}
cp_float caexcscf(cp_float num)
{
    cp_float result;
    result=(1.0/(csinf((num))))+1.0;
    return result;
}
cp_double caexcsc(cp_double num)
{
    cp_double result;
    result=(1.0/(csin((num))))+1.0;
    return result;
}
cp_doubles caexcscl(cp_doubles num)
{
    cp_doubles result;
    result=(1.0/(csinl((num))))+1.0;
    return result;
}
cp_float ccothf(cp_float num)
{
    cp_float result;
    result=1.0/(ctanhf((num)));
    return result;
}
cp_double ccoth(cp_double num)
{
    cp_double result;
    result=1.0/(ctanh((num)));
    return result;
}
cp_doubles ccothl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(ctanhl((num)));
    return result;
}
cp_float csechf(cp_float num)
{
    cp_float result;
    result=1.0/(ccoshf((num)));
    return result;
}
cp_double csech(cp_double num)
{
    cp_double result;
    result=1.0/(ccosh((num)));
    return result;
}
cp_doubles csechl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(ccoshl((num)));
    return result;
}
cp_float ccschf(cp_float num)
{
    cp_float result;
    result=1.0/(csinhf((num)));
    return result;
}
cp_double ccsch(cp_double num)
{
    cp_double result;
    result=1.0/(csinh((num)));
    return result;
}
cp_doubles ccschl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(csinhl((num)));
    return result;
}
cp_float cacothf(cp_float num)
{
    cp_float result;
    result=1.0/(catanhf((num)));
    return result;
}
cp_double cacoth(cp_double num)
{
    cp_double result;
    result=1.0/(catanh((num)));
    return result;
}
cp_doubles cacothl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(catanhl((num)));
    return result;
}
cp_float casechf(cp_float num)
{
    cp_float result;
    result=1.0/(cacoshf((num)));
    return result;
}
cp_double casech(cp_double num)
{
    cp_double result;
    result=1.0/(cacosh((num)));
    return result;
}
cp_doubles casechl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(cacoshl((num)));
    return result;
}
cp_float cacschf(cp_float num)
{
    cp_float result;
    result=1.0/(casinhf((num)));
    return result;
}
cp_double cacsch(cp_double num)
{
    cp_double result;
    result=1.0/(casinh((num)));
    return result;
}
cp_doubles cacschl(cp_doubles num)
{
    cp_doubles result;
    result=1.0/(casinhl((num)));
    return result;
}
/****复数域扩展三角函数定义结束****/
/****二维空间函数定义开始****/
//
Space2Df_t *Space2Df_new_point(Space2D_float x,Space2D_float y)
{
    Space2Df_t *point=c_malloc(Space2Df_t,1);
    if (point==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space2Df_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
    point->x=x;
    point->y=y;
    return point;
}
Space2D_t *Space2D_new_point(Space2D_double x,Space2D_double y)
{
    Space2D_t *point=c_malloc(Space2D_t,1);
    if (point==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space2D_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
    point->x=x;
    point->y=y;
    return point;
}
Space2Dl_t *Space2Dl_new_point(Space2D_doubles x,Space2D_doubles y)
{
    Space2Dl_t *point=c_malloc(Space2Dl_t,1);
    if (point==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space2Dl_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
    point->x=x;
    point->y=y;
    return point;
}
void Space2Df_del_point(Space2Df_t *point)
{
    c_free(point);
}
void Space2D_del_point(Space2D_t *point)
{
    c_free(point);
}
void Space2Dl_del_point(Space2Dl_t *point)
{
    c_free(point);
}
//
bool Space2Df_point2_are_same(Space2Df_t point_1,Space2Df_t point_2)
{
    if ((point_1.x==point_2.x)&&(point_1.y==point_2.y))
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool Space2D_point2_are_same(Space2D_t point_1,Space2D_t point_2)
{
    if ((point_1.x==point_2.x)&&(point_1.y==point_2.y))
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool Space2Dl_point2_are_same(Space2Dl_t point_1,Space2Dl_t point_2)
{
    if ((point_1.x==point_2.x)&&(point_1.y==point_2.y))
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool Space2Df_points_are_same(Space2Df_t *point_s,int count)
{
    int loop;
    if (count<2)
    {
        return false;
    }
    for (loop=1;loop<count;loop++)
    {
        if ((Space2Df_point2_are_same(point_s[0],point_s[loop])))
        {
            return true;
        }
    }
    return false;
}
bool Space2D_points_are_same(Space2D_t *point_s,int count)
{
    int loop;
    if (count<2)
    {
        return false;
    }
    for (loop=1;loop<count;loop++)
    {
        if ((Space2D_point2_are_same(point_s[0],point_s[loop])))
        {
            return true;
        }
    }
    return false;
}
bool Space2Dl_points_are_same(Space2Dl_t *point_s,int count)
{
    int loop;
    if (count<2)
    {
        return false;
    }
    for (loop=1;loop<count;loop++)
    {
        if ((Space2Dl_point2_are_same(point_s[0],point_s[loop])))
        {
            return true;
        }
    }
    return false;
}
//
Space2D_float Space2Df_point2_euclidean_distance(Space2Df_t point_1,Space2Df_t point_2)
{
    Space2D_float dx,dy,distance;
    dx=0,dy=0,distance=0;
    dx=point_1.x-point_2.x;
    dy=point_1.y-point_2.y;
    distance=sqrtf(((dx*dx)+(dy*dy)));
    return distance;
}
Space2D_double Space2D_point2_euclidean_distance(Space2D_t point_1,Space2D_t point_2)
{
    Space2D_double dx,dy,distance;
    dx=0,dy=0,distance=0;
    dx=point_1.x-point_2.x;
    dy=point_1.y-point_2.y;
    distance=sqrt(((dx*dx)+(dy*dy)));
    return distance;
}
Space2D_doubles Space2Dl_point2_euclidean_distance(Space2Dl_t point_1,Space2Dl_t point_2)
{
    Space2D_doubles dx,dy,distance;
    dx=0,dy=0,distance=0;
    dx=point_1.x-point_2.x;
    dy=point_1.y-point_2.y;
    distance=sqrtl(((dx*dx)+(dy*dy)));
    return distance;
}
Space2D_float Space2Df_points_euclidean_distance(Space2Df_t *point_s,int count)
{
    Space2D_float total_distance;
    int loop;
    total_distance=0;
    for (loop=0;loop<count-1;loop++)
    {
        total_distance+=Space2Df_point2_euclidean_distance(point_s[loop],point_s[loop+1]);
    }
    return total_distance;
}
Space2D_double Space2D_points_euclidean_distance(Space2D_t *point_s,int count)
{
    Space2D_double total_distance;
    int loop;
    total_distance=0;
    for (loop=0;loop<count-1;loop++)
    {
        total_distance+=Space2D_point2_euclidean_distance(point_s[loop],point_s[loop+1]);
    }
    return total_distance;
}
Space2D_doubles Space2Dl_points_euclidean_distance(Space2Dl_t *point_s,int count)
{
    Space2D_doubles total_distance;
    int loop;
    total_distance=0;
    for (loop=0;loop<count-1;loop++)
    {
        total_distance+=Space2Dl_point2_euclidean_distance(point_s[loop],point_s[loop+1]);
    }
    return total_distance;
}
//
Space2Df_line_t *Space2Df_new_line(Space2Df_t head_point,Space2Df_t tail_point)
{
	if ((Space2Df_point2_are_same(head_point,tail_point)))
	{
		fprintf(stderr,"The head point must be different from the tail point.\n");
		return nullptr;
	}
	Space2Df_line_t *line=c_malloc(Space2Df_line_t,1);
	if (line==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space2Df_line_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
	line->head=head_point;
	line->tail=tail_point;
	return line;
}
Space2D_line_t *Space2D_new_line(Space2D_t head_point,Space2D_t tail_point)
{
	if ((Space2D_point2_are_same(head_point,tail_point)))
	{
		fprintf(stderr,"The head point must be different from the tail point.\n");
		return nullptr;
	}
	Space2D_line_t *line=c_malloc(Space2D_line_t,1);
	if (line==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space2D_line_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
	line->head=head_point;
	line->tail=tail_point;
	return line;
}
Space2Dl_line_t *Space2Dl_new_line(Space2Dl_t head_point,Space2Dl_t tail_point)
{
	if ((Space2Dl_point2_are_same(head_point,tail_point)))
	{
		fprintf(stderr,"The head point must be different from the tail point.\n");
		return nullptr;
	}
	Space2Dl_line_t *line=c_malloc(Space2Dl_line_t,1);
	if (line==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space2Dl_line_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
	line->head=head_point;
	line->tail=tail_point;
	return line;
}
void Space2Df_del_line(Space2Df_line_t *line)
{
	c_free(line);
}
void Space2D_del_line(Space2D_line_t *line)
{
	c_free(line);
}
void Space2Dl_del_line(Space2Dl_line_t *line)
{
	c_free(line);
}
Space2D_float Space2Df_line_length(Space2Df_line_t line)
{
	Space2D_float length;
	length=0;
	length=Space2Df_point2_euclidean_distance(line.head,line.tail);
	return length;
}
Space2D_double Space2D_line_length(Space2D_line_t line)
{
	Space2D_double length;
	length=0;
	length=Space2D_point2_euclidean_distance(line.head,line.tail);
	return length;
}
Space2D_doubles Space2Dl_line_length(Space2Dl_line_t line)
{
	Space2D_doubles length;
	length=0;
	length=Space2Dl_point2_euclidean_distance(line.head,line.tail);
	return length;
}
/****二维空间函数定义结束****/
/****三维空间函数定义开始****/
//
Space3Df_t *Space3Df_new_point(Space3D_float x,Space3D_float y,Space3D_float z)
{
    Space3Df_t *point=c_malloc(Space3Df_t,1);
    if (point==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space3Df_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
    point->x=x;
    point->y=y;
    point->z=z;
    return point;
}
Space3D_t *Space3D_new_point(Space3D_double x,Space3D_double y,Space3D_double z)
{
    Space3D_t *point=c_malloc(Space3D_t,1);
    if (point==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space3D_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
    point->x=x;
    point->y=y;
    point->z=z;
    return point;
}
Space3Dl_t *Space3Dl_new_point(Space3D_doubles x,Space3D_doubles y,Space3D_doubles z)
{
    Space3Dl_t *point=c_malloc(Space3Dl_t,1);
    if (point==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space3Dl_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
    point->x=x;
    point->y=y;
    point->z=z;
    return point;
}
void Space3Df_del_point(Space3Df_t *point)
{
    c_free(point);
}
void Space3D_del_point(Space3D_t *point)
{
    c_free(point);
}
void Space3Dl_del_point(Space3Dl_t *point)
{
    c_free(point);
}
//
bool Space3Df_point2_are_same(Space3Df_t point_1,Space3Df_t point_2)
{
    if ((point_1.x==point_2.x)&&(point_1.y==point_2.y)&&(point_1.z==point_2.z))
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool Space3D_point2_are_same(Space3D_t point_1,Space3D_t point_2)
{
    if ((point_1.x==point_2.x)&&(point_1.y==point_2.y)&&(point_1.z==point_2.z))
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool Space3Dl_point2_are_same(Space3Dl_t point_1,Space3Dl_t point_2)
{
    if ((point_1.x==point_2.x)&&(point_1.y==point_2.y)&&(point_1.z==point_2.z))
    {
        return true;
    }
    else
    {
        return false;
    }
}
bool Space3Df_points_are_same(Space3Df_t *point_s,int count)
{
    int loop;
    if (count<2)
    {
        return false;
    }
    for (loop=1;loop<count;loop++)
    {
        if ((Space3Df_point2_are_same(point_s[0],point_s[loop])))
        {
            return true;
        }
    }
    return false;
}
bool Space3D_points_are_same(Space3D_t *point_s,int count)
{
    int loop;
    if (count<2)
    {
        return false;
    }
    for (loop=1;loop<count;loop++)
    {
        if ((Space3D_point2_are_same(point_s[0],point_s[loop])))
        {
            return true;
        }
    }
    return false;
}
bool Space3Dl_points_are_same(Space3Dl_t *point_s,int count)
{
    int loop;
    if (count<2)
    {
        return false;
    }
    for (loop=1;loop<count;loop++)
    {
        if ((Space3Dl_point2_are_same(point_s[0],point_s[loop])))
        {
            return true;
        }
    }
    return false;
}
//
Space3D_float Space3Df_point2_euclidean_distance(Space3Df_t point_1,Space3Df_t point_2)
{
    Space3D_float dx,dy,dz,distance;
    dx=0,dy=0,dz=0,distance=0;
    dx=point_1.x-point_2.x;
    dy=point_1.y-point_2.y;
    dz=point_1.z-point_2.z;
    distance=sqrtf(((dx*dx)+(dy*dy)+(dz*dz)));
    return distance;
}
Space3D_double Space3D_point2_euclidean_distance(Space3D_t point_1,Space3D_t point_2)
{
    Space3D_double dx,dy,dz,distance;
    dx=0,dy=0,dz=0,distance=0;
    dx=point_1.x-point_2.x;
    dy=point_1.y-point_2.y;
    dz=point_1.z-point_2.z;
    distance=sqrt(((dx*dx)+(dy*dy)+(dz*dz)));
    return distance;
}
Space3D_doubles Space3Dl_point2_euclidean_distance(Space3Dl_t point_1,Space3Dl_t point_2)
{
    Space3D_doubles dx,dy,dz,distance;
    dx=0,dy=0,dz=0,distance=0;
    dx=point_1.x-point_2.x;
    dy=point_1.y-point_2.y;
    dz=point_1.z-point_2.z;
    distance=sqrtl(((dx*dx)+(dy*dy)+(dz*dz)));
    return distance;
}
Space3D_float Space3Df_points_euclidean_distance(Space3Df_t *point_s,int count)
{
    Space3D_float total_distance;
    int loop;
    total_distance=0;
    for (loop=0;loop<count-1;loop++)
    {
        total_distance+=Space3Df_point2_euclidean_distance(point_s[loop],point_s[loop+1]);
    }
    return total_distance;
}
Space3D_double Space3D_points_euclidean_distance(Space3D_t *point_s,int count)
{
    Space3D_double total_distance;
    int loop;
    total_distance=0;
    for (loop=0;loop<count-1;loop++)
    {
        total_distance+=Space3D_point2_euclidean_distance(point_s[loop],point_s[loop+1]);
    }
    return total_distance;
}
Space3D_doubles Space3Dl_points_euclidean_distance(Space3Dl_t *point_s,int count)
{
    Space3D_doubles total_distance;
    int loop;
    total_distance=0;
    for (loop=0;loop<count-1;loop++)
    {
        total_distance+=Space3Dl_point2_euclidean_distance(point_s[loop],point_s[loop+1]);
    }
    return total_distance;
}
Space3Df_line_t *Space3Df_new_line(Space3Df_t head_point,Space3Df_t tail_point)
{
	if ((Space3Df_point2_are_same(head_point,tail_point)))
	{
		fprintf(stderr,"The head point must be different from the tail point.\n");
		return nullptr;
	}
	Space3Df_line_t *line=c_malloc(Space3Df_line_t,1);
	if (line==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space3Df_line_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
	line->head=head_point;
	line->tail=tail_point;
	return line;
}
Space3D_line_t *Space3D_new_line(Space3D_t head_point,Space3D_t tail_point)
{
	if ((Space3D_point2_are_same(head_point,tail_point)))
	{
		fprintf(stderr,"The head point must be different from the tail point.\n");
		return nullptr;
	}
	Space3D_line_t *line=c_malloc(Space3D_line_t,1);
	if (line==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space3D_line_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
	line->head=head_point;
	line->tail=tail_point;
	return line;
}
Space3Dl_line_t *Space3Dl_new_line(Space3Dl_t head_point,Space3Dl_t tail_point)
{
	if ((Space3Dl_point2_are_same(head_point,tail_point)))
	{
		fprintf(stderr,"The head point must be different from the tail point.\n");
		return nullptr;
	}
	Space3Dl_line_t *line=c_malloc(Space3Dl_line_t,1);
	if (line==nullptr)
    {
    	fprintf(stderr,"Memory allocation failed for Space3Dl_line_t.\n~Return error code %d\n~%s\n",errno,(strerror(errno)));
    	return nullptr;
    }
	line->head=head_point;
	line->tail=tail_point;
	return line;
}
void Space3Df_del_line(Space3Df_line_t *line)
{
	c_free(line);
}
void Space3D_del_line(Space3D_line_t *line)
{
	c_free(line);
}
void Space3Dl_del_line(Space3Dl_line_t *line)
{
	c_free(line);
}
Space3D_float Space3Df_line_length(Space3Df_line_t line)
{
	Space3D_float length;
	length=0;
	length=Space3Df_point2_euclidean_distance(line.head,line.tail);
	return length;
}
Space3D_double Space3D_line_length(Space3D_line_t line)
{
	Space3D_double length;
	length=0;
	length=Space3D_point2_euclidean_distance(line.head,line.tail);
	return length;
}
Space3D_doubles Space3Dl_line_length(Space3Dl_line_t line)
{
	Space3D_doubles length;
	length=0;
	length=Space3Dl_point2_euclidean_distance(line.head,line.tail);
	return length;
}
/****三维空间函数定义结束****/